Current Location: Home> Function Categories> octdec

octdec

Convert octal to decimal
Name:octdec
Category:math
Programming Language:php
One-line Description:Convert octal to decimal.

Definition and usage

The octdec() function converts octal to decimal.

Example

 <?php
echo octdec ( "36" ) ;
echo octdec ( "12" ) ;
echo octdec ( "3063" ) ;
echo octdec ( "106" ) ;
?>

Try it yourself

grammar

 octdec ( octal_string )
parameter describe
octal_string Required. Specifies the octal number to be converted.

illustrate

Returns the decimal equivalent value of the octal number represented by the octal_string parameter. The maximum convertible value is 177777777777 or 2147483647 in decimal. Starting with PHP 4.1.0, the function can handle large numbers, in which case it returns the float type.

Similar Functions
  • Generate better random numbers mt_rand

    mt_rand

    Generatebetterrandom
  • Returns log(1 + number), and can calculate the exact result even when the value of number is close to zero. log1p

    log1p

    Returnslog(1+number)
  • Perform floating point division under IEEE 754 semantics fdiv

    fdiv

    Performfloatingpoint
  • Convert decimal to binary decbin

    decbin

    Convertdecimaltobina
  • Generate a random integer rand

    rand

    Generatearandominteg
  • Exponential expressions pow

    pow

    Exponentialexpressio
  • Hyperbolic cosine cosh

    cosh

    Hyperboliccosine
  • Further method to sort ceil

    ceil

    Furthermethodtosort
Popular Articles